import React from 'react';
import ReactDOM from 'react-dom';

import './index.css';

import Father from './components/father';

import Comment from './components/comment';

import Counter from './components/counter';

import Cart from './components/cart';

import Welcome from './components/welcome';

ReactDOM.render(
  <React.StrictMode>
    <h3>从父组件到子组件</h3>
    <Father id="first" name="爱新觉罗·福临" />
    <h3>从子组件到父组件</h3>
    <Comment />
    <h3>兄弟组件之间通信(状态提升)</h3>
    <Counter />
    <h3>跨级组件之间的通信</h3>
    <Cart />
    <h3>通过props.children获取标签体(类似于Vue中的插槽)</h3>
    <Welcome>
      <b>老王</b>
    </Welcome>
  </React.StrictMode>,
  document.getElementById('root')
);